<template>
    <el-tabs v-model="activeName" class="demo-tabs" @tab-change="change">
      <el-tab-pane label="突破300日线" name="weekUp300d">
        <week-up-300-d v-if="activeName === 'weekUp300d'"></week-up-300-d>
      </el-tab-pane>

      <el-tab-pane label="跌破300日线" name="weekDown300d">
        <week-down-300-d v-if="activeName === 'weekDown300d'"></week-down-300-d>
      </el-tab-pane>

      <el-tab-pane label="突破10分位点" name="monthLpUp">
        <month-lp-up v-if="activeName ==='monthLpUp'"></month-lp-up>
      </el-tab-pane>

      <el-tab-pane label="跌破10分位点" name="monthLpDown">
        <month-lp-down v-if="activeName ==='monthLpDown'"></month-lp-down>
      </el-tab-pane>

      <el-tab-pane label="周涨跌统计" name="weekPctStat">
        <week-pct-stat v-if="activeName ==='weekPctStat'"></week-pct-stat>
      </el-tab-pane>

      <el-tab-pane label="月涨跌统计" name="monthPctStat">
        <month-pct-stat v-if="activeName ==='monthPctStat'"></month-pct-stat>
      </el-tab-pane>

      <el-tab-pane label="年涨跌统计" name="yearPctStat">
        <year-pct-stat v-if="activeName ==='yearPctStat'"></year-pct-stat>
      </el-tab-pane>

      <el-tab-pane label="分位点跌幅统计" name="monthLpDecrease">
        <month-lp-decrease v-if="activeName ==='monthLpDecrease'"></month-lp-decrease>
      </el-tab-pane>

      <el-tab-pane label="低点表现" name="weekLowSta">
        <week-low-sta v-if="activeName ==='weekLowSta'"></week-low-sta>
      </el-tab-pane>

      <el-tab-pane label="近期文章" name="lastedArticle">
        <lasted-article v-if="activeName ==='lastedArticle'"></lasted-article>
      </el-tab-pane>

      <el-tab-pane label="DE_SUM" name="dailyDeSum">
        <daily-de-sum v-if="activeName ==='dailyDeSum'"></daily-de-sum>
      </el-tab-pane>

      <el-tab-pane label="DailyMonitor" name="DailyMonitor">
        <DailyMonitor v-if="activeName ==='DailyMonitor'"></DailyMonitor>
      </el-tab-pane>

      <el-tab-pane label="融资融券" name="MarginTrading">
        <MarginTradingEchart v-if="activeName ==='MarginTrading'"></MarginTradingEchart>
      </el-tab-pane>

      <el-tab-pane label="公众号" name="FollowView">
        <FollowView v-if="activeName ==='FollowView'"></FollowView>
      </el-tab-pane>

    </el-tabs>
  </template>

<script setup>
import { ref } from 'vue'
import WeekUp300D from './WeekUp300D.vue'
import WeekDown300D from './WeekDown300D.vue'
import WeekPctStat from './WeekPctStat.vue'
import MonthPctStat from './MonthPctStat.vue'
import YearPctStat from './YearPctStat.vue'
import MonthLpUp from './MonthLpUp.vue'
import MonthLpDecrease from './MonthLpDecrease.vue'
import MonthLpDown from './MonthLpDown.vue'
import FollowView from '../views/FollowView.vue'
import WeekLowSta from './WeekLowSta.vue'
import LastedArticle from './article/LastedArticle.vue'
import DailyDeSum from './DailyDeSum.vue'
import DailyMonitor from './DailyMonitor.vue'
import MarginTradingEchart from './MarginTradingEchart.vue'

const activeNameKey = "StockStaticActiveName"
const activeName = ref(sessionStorage.getItem(activeNameKey) || 'weekUp300d')

const change = (tabName) => {
  sessionStorage.setItem(activeNameKey, tabName)
  umami.track("StockStaticTabChange:" + tabName)
}
</script>

<style>
</style>
